﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;

namespace Douban.Api.Authorization
{
    public class OAuthWebRequestUtility
    {
        public static Uri GenerateUri(
            string token, string tokenSecret,
            Uri uri,
            ConsumerBase consumer)
        {
            OAuth auth = new OAuth();
            return new Uri(auth.GenerateRequestUrl(
                uri,
                consumer.ConsumerKey,
                consumer.ConsumerSecret,
                token,
                tokenSecret,
                "get",
                auth.GenerateTimeStamp(),
                auth.GenerateNonce()));
        }
    }
}
